package com.example.demo.service;

import com.example.demo.dao.BookDao;
import com.example.demo.model.BookInfo;

import java.util.List;

public class BookService {
    public List<BookInfo> getBookList() {
        BookDao boolDao = new BookDao();
        List<BookInfo> books = boolDao.mockData();
        for (BookInfo book : books) {
            if (book.getStatus() == 1) {
                book.setStatusCN("可借阅");
            } else {
                book.setStatusCN("不可借阅");
            }
        }
        return books;
    }
}
